home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Tool Chest / Dev.CD Aug 98 TC.toast / Sample Code / Networking / OT PAPServerSample / PAPPostScriptStuff.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-06  |  1.4 KB  |  76 lines  |  [TEXT/CWIE]

  1. /*
  2.     File: PAPPostScriptStuff.h
  3.     
  4.     Header file for the PAPPostScriptStuff.c code file
  5.     
  6. */
  7.  
  8.  
  9. #ifndef __PAPPOSTSCRIPTSTUFF__
  10. #define __PAPPOSTSCRIPTSTUFF__
  11.  
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. #if PRAGMA_ALIGN_SUPPORTED
  18. #pragma options align=mac68k
  19. #endif
  20.  
  21. #if PRAGMA_IMPORT_SUPPORTED
  22. #pragma import on
  23. #endif
  24.  
  25. #define kQueryPrefix    0x0D25253F
  26. #define kBeginQueryStr    "Query\015"
  27. #define kQueryStr        "Query: "
  28. #define kBeginStr        "Begin"
  29. #define kEndStr            "\015\045\045\077End"
  30. #define kEOFStr            "\015\045\045EOF\015"
  31. #define kReturnChar        0x0D
  32. #define kLineFeedChar    0x0A
  33. #define kSpaceChar        0x20
  34.  
  35. enum {
  36.     kCaseMustMatch = 0,
  37.     kCaseMatchAll
  38. };
  39.  
  40. enum {
  41.     kNoMatch = 0,
  42.     kPartialMatch         = 0x0001,
  43.     kQueryPrefixFound     = 0x0002,
  44.     kBeginEndStrFound     = 0x0004,
  45.     kQueryStrFound         = 0x0008,
  46.     kMatch                 = 0x000E
  47. };
  48.  
  49. enum {
  50.     kFindBeginStr = 0,
  51.     kFindEndStr
  52. };
  53.  
  54. // prototypes
  55. extern Boolean         TestDataIsPSQuery(PacketPtr packetPtr);
  56. extern OSStatus     ProcessPSQuery(PacketPtr packetPtr);
  57. extern Boolean         DoProcessPSQuery(PacketPtr    packetPtr);
  58. extern Boolean         IsPacketAPSQuery(PacketPtr packetPtr);
  59. extern UInt16        FindQueryString(PacketPtr packetPtr, SInt16 whichStr);
  60. extern UInt16        ProcessDefaultResponse(PacketPtr packetPtr);
  61. extern void         SendEmptyPacket(PacketPtr packetPtr);
  62.  
  63. #if PRAGMA_IMPORT_SUPPORTED
  64. #pragma import off
  65. #endif
  66.  
  67. #if PRAGMA_ALIGN_SUPPORTED
  68. #pragma options align=reset
  69. #endif
  70.  
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74.  
  75. #endif /* __PAPPOSTSCRIPTSTUFF__ */
  76.